<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="shiro" uri="http://www.springside.org.cn/tags/shiro"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!-- #section:basics/navbar.layout -->
<div id="navbar" class="navbar navbar-default">
	<script type="text/javascript">
		try {
			ace.settings.check('navbar', 'fixed')
		} catch (e) {
		}

	</script>

	<div class="navbar-container" id="navbar-container">
		<!-- #section:basics/sidebar.mobile.toggle -->
		<button type="button" class="navbar-toggle menu-toggler pull-left" id="menu-toggler" data-target="#sidebar">
			<span class="sr-only">Toggle sidebar</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span>
		</button>

		<!-- /section:basics/sidebar.mobile.toggle -->
		<div class="navbar-header pull-left">
			<!-- #section:basics/navbar.layout.brand -->
			<a href="#" class="navbar-brand"> <small> <img src="${ctx}/static/image/baosteel.ico" style="height: 25px;" />
					${applicationScope.siteName }
			</small>
			</a>

			<!-- /section:basics/navbar.layout.brand -->

			<!-- #section:basics/navbar.toggle -->

			<!-- /section:basics/navbar.toggle -->
		</div>

		<!-- #section:basics/navbar.dropdown -->
		<div class="navbar-buttons navbar-header pull-right" role="navigation">
			<ul class="nav ace-nav">
				<li class="grey"><a data-toggle="dropdown" class="dropdown-toggle" href="#"> <i class="ace-icon fa fa-tasks"></i> <span
						class="badge badge-grey">${calendarsize}</span>
				</a>
					<ul class="dropdown-menu-right dropdown-navbar dropdown-menu dropdown-caret dropdown-close">
						<li class="dropdown-header"><i class="ace-icon fa fa-envelope-o"></i> 日程安排： ${calendarsize}</li>

						<li class="dropdown-content">
							<ul class="dropdown-menu dropdown-navbar">
								<c:forEach items="${calendar}" var="calendarList">
									<li><a href="#" class="clearfix"> <img src="${ctx}/static/ace/avatars/avatar2.png" class="msg-photo" alt="Alex's Avatar" />
											<span class="msg-body"> <span class="msg-title"> <span class="blue">日程安排：</span>
													${fn:substring(calendarList.title,0,16)}
											</span> <span class="msg-time"> <i class="ace-icon fa fa-clock-o"></i> <span>${fn:substring(calendarList.createTime,0,16)}
												</span>
											</span></a></li>
								</c:forEach>
							</ul>
						</li>

						<li class="dropdown-footer"><a href="#" onclick="addTab('calendar', '日程安排', '${ctx}/basic/calendar', null, null)"> 查看所有日程安排<i
								class="ace-icon fa fa-arrow-right"></i>
						</a></li>
					</ul></li>
				<li class="purple"><a data-toggle="dropdown" class="dropdown-toggle" href="#"> <i
						class="ace-icon fa fa-bell icon-animated-bell"></i> <span class="badge badge-important">${repairsize}</span>
				</a>
					<ul class="dropdown-menu-right dropdown-navbar dropdown-menu dropdown-caret dropdown-close">
						<li class="dropdown-header"><i class="ace-icon fa fa-bell icon-animated-bell"></i> 维修任务： ${repairsize}</li>
						<li class="dropdown-content">
							<ul class="dropdown-menu dropdown-navbar">
								<c:forEach items="${repairs}" var="repair">
									<li><a href="#" class="clearfix"> <img src="${ctx}/static/ace/avatars/avatar2.png" class="msg-photo" alt="Alex's Avatar" />
											<span class="msg-body"> <span class="msg-title"> <span class="blue">维修任务：</span>
													${fn:substring(repair.equipName,0,16)}
											</span> <span class="msg-time"> <i class="ace-icon fa fa-clock-o"></i> <span>${fn:substring(repair.createTime,0,16)}
												</span>
											</span></a></li>
								</c:forEach>
							</ul>
						</li>

						<li class="dropdown-footer"><a href="#"
							onclick="addTab('listTasks', '维修任务', '${ctx}/equip/${controller}', null, null)"> 查看所有维修任务 <i
								class="ace-icon fa fa-arrow-right"></i>
						</a></li>

					</ul></li>

				<li class="green"><a data-toggle="dropdown" class="dropdown-toggle" href="#"> <i class="ace-icon fa fa-envelope-o"></i> <span
						class="badge badge-success">${notifyInfosize}</span>
				</a>

					<ul class="dropdown-menu-right dropdown-navbar dropdown-menu dropdown-caret dropdown-close">
						<li class="dropdown-header"><i class="ace-icon fa fa-envelope-o"></i> 未读邮件： ${notifyInfosize}</li>

						<li class="dropdown-content">
							<ul class="dropdown-menu dropdown-navbar">
								<c:forEach items="${notifyInfo}" var="notifyInfoList">
									<li><a href="#" class="clearfix"> <img src="${ctx}/static/ace/avatars/avatar2.png" class="msg-photo" alt="Alex's Avatar" />
											<span class="msg-body"> <span class="msg-title"> <span class="blue">未读邮件：</span>
													${fn:substring(notifyInfoList.title,0,16)}
											</span> <span class="msg-time"> <i class="ace-icon fa fa-clock-o"></i> <span>${fn:substring(notifyInfoList.createTime,0,16)}
												</span>
											</span></a></li>
								</c:forEach>
							</ul>
						</li>

						<li class="dropdown-footer"><a href="#"
							onclick="addTab('receiver-email', '未读邮件', '${ctx}/basic/notifyInfo/to_receiver', null, null)"> 查看所有未读邮件 <i
								class="ace-icon fa fa-arrow-right"></i>
						</a></li>
					</ul></li>


				<!-- #section:basics/navbar.user_menu -->
				<li class="light-blue"><a data-toggle="dropdown" href="#" class="dropdown-toggle"> <img class="nav-user-photo"
						src="${ctx}/static/ace/avatars/avatar2.png" alt="<shiro:principal />" /> <span class="user-info"> <shiro:principal /> &nbsp;
							<br> <shiro:principal property="deptName" />
					</span> <i class="ace-icon fa fa-caret-down"></i>
				</a>
					<ul class="user-menu dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
						<c:if test="${sysManager}">
							<li><a href="#" onclick="addTab('changeRunAs', '切换身份', '${ctx}/basic/user/changeRunAs', null, null)"> <i
									class="ace-icon fa fa-power-off"></i> 切换身份
							</a></li>
						</c:if>
						<li><a href="#" onclick="addTab('changePassword', '修改密码', '${ctx}/basic/user/to-updatePassword', null, null)"><i
								class="ace-icon fa fa-user"></i> 修改密码 </a></li>

						<li class="divider"></li>

						<li><a href="${ctx}/logout"> <i class="ace-icon fa fa-power-off"></i> 退出系统
						</a></li>
					</ul></li>

				<!-- /section:basics/navbar.user_menu -->
			</ul>
		</div>

		<!-- /section:basics/navbar.dropdown -->
	</div>
	<!-- /.navbar-container -->
</div>
<!-- /section:basics/navbar.layout -->